3.897 \(\int (a+i a \tan (e+f x))^3 (c-i c \tan (e+f x))^2 \, dx\)

Optimal. Leaf size=61 \[ \frac{a^3 c^2 \tan ^3(e+f x)}{3 f}+\frac{a^3 c^2 \tan (e+f x)}{f}+\frac{i a^3 c^2 \sec ^4(e+f x)}{4 f} \]

[Out]

((I/4)*a^3*c^2*Sec[e + f*x]^4)/f + (a^3*c^2*Tan[e + f*x])/f + (a^3*c^2*Tan[e + f*x]^3)/(3*f)

________________________________________________________________________________________

Rubi [A]  time = 0.0874086, antiderivative size = 61, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.097, Rules used = {3522, 3486, 3767} \[ \frac{a^3 c^2 \tan ^3(e+f x)}{3 f}+\frac{a^3 c^2 \tan (e+f x)}{f}+\frac{i a^3 c^2 \sec ^4(e+f x)}{4 f} \]

Antiderivative was successfully verified.

[In]

Int[(a + I*a*Tan[e + f*x])^3*(c - I*c*Tan[e + f*x])^2,x]

[Out]

((I/4)*a^3*c^2*Sec[e + f*x]^4)/f + (a^3*c^2*Tan[e + f*x])/f + (a^3*c^2*Tan[e + f*x]^3)/(3*f)

Rule 3522

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Di
st[a^m*c^m, Int[Sec[e + f*x]^(2*m)*(c + d*Tan[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] &&
EqQ[b*c + a*d, 0] && EqQ[a^2 + b^2, 0] && IntegerQ[m] &&  !(IGtQ[n, 0] && (LtQ[m, 0] || GtQ[m, n]))

Rule 3486

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*(d*Sec[
e + f*x])^m)/(f*m), x] + Dist[a, Int[(d*Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, m}, x] && (IntegerQ[2
*m] || NeQ[a^2 + b^2, 0])

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rubi steps

\begin{align*} \int (a+i a \tan (e+f x))^3 (c-i c \tan (e+f x))^2 \, dx &=\left (a^2 c^2\right ) \int \sec ^4(e+f x) (a+i a \tan (e+f x)) \, dx\\ &=\frac{i a^3 c^2 \sec ^4(e+f x)}{4 f}+\left (a^3 c^2\right ) \int \sec ^4(e+f x) \, dx\\ &=\frac{i a^3 c^2 \sec ^4(e+f x)}{4 f}-\frac{\left (a^3 c^2\right ) \operatorname{Subst}\left (\int \left (1+x^2\right ) \, dx,x,-\tan (e+f x)\right )}{f}\\ &=\frac{i a^3 c^2 \sec ^4(e+f x)}{4 f}+\frac{a^3 c^2 \tan (e+f x)}{f}+\frac{a^3 c^2 \tan ^3(e+f x)}{3 f}\\ \end{align*}

Mathematica [A]  time = 2.86703, size = 52, normalized size = 0.85 \[ \frac{a^3 c^2 \sec (e) \sec ^4(e+f x) (4 \sin (e+2 f x)+\sin (3 e+4 f x)-3 \sin (e)+3 i \cos (e))}{12 f} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + I*a*Tan[e + f*x])^3*(c - I*c*Tan[e + f*x])^2,x]

[Out]

(a^3*c^2*Sec[e]*Sec[e + f*x]^4*((3*I)*Cos[e] - 3*Sin[e] + 4*Sin[e + 2*f*x] + Sin[3*e + 4*f*x]))/(12*f)

________________________________________________________________________________________

Maple [A]  time = 0.003, size = 50, normalized size = 0.8 \begin{align*}{\frac{{a}^{3}{c}^{2}}{f} \left ( \tan \left ( fx+e \right ) +{\frac{i}{4}} \left ( \tan \left ( fx+e \right ) \right ) ^{4}+{\frac{ \left ( \tan \left ( fx+e \right ) \right ) ^{3}}{3}}+{\frac{i}{2}} \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+I*a*tan(f*x+e))^3*(c-I*c*tan(f*x+e))^2,x)

[Out]

1/f*a^3*c^2*(tan(f*x+e)+1/4*I*tan(f*x+e)^4+1/3*tan(f*x+e)^3+1/2*I*tan(f*x+e)^2)

________________________________________________________________________________________

Maxima [A]  time = 1.51776, size = 92, normalized size = 1.51 \begin{align*} \frac{3 i \, a^{3} c^{2} \tan \left (f x + e\right )^{4} + 4 \, a^{3} c^{2} \tan \left (f x + e\right )^{3} + 6 i \, a^{3} c^{2} \tan \left (f x + e\right )^{2} + 12 \, a^{3} c^{2} \tan \left (f x + e\right )}{12 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^3*(c-I*c*tan(f*x+e))^2,x, algorithm="maxima")

[Out]

1/12*(3*I*a^3*c^2*tan(f*x + e)^4 + 4*a^3*c^2*tan(f*x + e)^3 + 6*I*a^3*c^2*tan(f*x + e)^2 + 12*a^3*c^2*tan(f*x
+ e))/f

________________________________________________________________________________________

Fricas [A]  time = 1.02904, size = 263, normalized size = 4.31 \begin{align*} \frac{24 i \, a^{3} c^{2} e^{\left (4 i \, f x + 4 i \, e\right )} + 16 i \, a^{3} c^{2} e^{\left (2 i \, f x + 2 i \, e\right )} + 4 i \, a^{3} c^{2}}{3 \,{\left (f e^{\left (8 i \, f x + 8 i \, e\right )} + 4 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 6 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 4 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^3*(c-I*c*tan(f*x+e))^2,x, algorithm="fricas")

[Out]

1/3*(24*I*a^3*c^2*e^(4*I*f*x + 4*I*e) + 16*I*a^3*c^2*e^(2*I*f*x + 2*I*e) + 4*I*a^3*c^2)/(f*e^(8*I*f*x + 8*I*e)
 + 4*f*e^(6*I*f*x + 6*I*e) + 6*f*e^(4*I*f*x + 4*I*e) + 4*f*e^(2*I*f*x + 2*I*e) + f)

________________________________________________________________________________________

Sympy [B]  time = 3.21044, size = 143, normalized size = 2.34 \begin{align*} \frac{\frac{8 i a^{3} c^{2} e^{- 4 i e} e^{4 i f x}}{f} + \frac{16 i a^{3} c^{2} e^{- 6 i e} e^{2 i f x}}{3 f} + \frac{4 i a^{3} c^{2} e^{- 8 i e}}{3 f}}{e^{8 i f x} + 4 e^{- 2 i e} e^{6 i f x} + 6 e^{- 4 i e} e^{4 i f x} + 4 e^{- 6 i e} e^{2 i f x} + e^{- 8 i e}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))**3*(c-I*c*tan(f*x+e))**2,x)

[Out]

(8*I*a**3*c**2*exp(-4*I*e)*exp(4*I*f*x)/f + 16*I*a**3*c**2*exp(-6*I*e)*exp(2*I*f*x)/(3*f) + 4*I*a**3*c**2*exp(
-8*I*e)/(3*f))/(exp(8*I*f*x) + 4*exp(-2*I*e)*exp(6*I*f*x) + 6*exp(-4*I*e)*exp(4*I*f*x) + 4*exp(-6*I*e)*exp(2*I
*f*x) + exp(-8*I*e))

________________________________________________________________________________________

Giac [A]  time = 1.59247, size = 138, normalized size = 2.26 \begin{align*} \frac{24 i \, a^{3} c^{2} e^{\left (4 i \, f x + 4 i \, e\right )} + 16 i \, a^{3} c^{2} e^{\left (2 i \, f x + 2 i \, e\right )} + 4 i \, a^{3} c^{2}}{3 \,{\left (f e^{\left (8 i \, f x + 8 i \, e\right )} + 4 \, f e^{\left (6 i \, f x + 6 i \, e\right )} + 6 \, f e^{\left (4 i \, f x + 4 i \, e\right )} + 4 \, f e^{\left (2 i \, f x + 2 i \, e\right )} + f\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^3*(c-I*c*tan(f*x+e))^2,x, algorithm="giac")

[Out]

1/3*(24*I*a^3*c^2*e^(4*I*f*x + 4*I*e) + 16*I*a^3*c^2*e^(2*I*f*x + 2*I*e) + 4*I*a^3*c^2)/(f*e^(8*I*f*x + 8*I*e)
 + 4*f*e^(6*I*f*x + 6*I*e) + 6*f*e^(4*I*f*x + 4*I*e) + 4*f*e^(2*I*f*x + 2*I*e) + f)